﻿<UserControl
    x:Class="ZipSpace.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:controls="clr-namespace:System.Windows.Controls;assembly=System.Windows.Controls"
    xmlns:zipspace="clr-namespace:ZipSpace"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400"
    AllowDrop="True" Drop="OnDrop">

    <Grid x:Name="LayoutRoot" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="7*" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="3*" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>

        <!-- Out of Browser Notification -->
        <Border Height="32"  
            BorderBrush="#b4a555"  
            BorderThickness="1"  
            x:Name="OutOfBrowserNotification"  
            Visibility="Collapsed">
            <Grid>
                <Grid.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="#fff6bd" Offset="0" />
                        <GradientStop Color="#ffec82" Offset="1" />
                    </LinearGradientBrush>
                </Grid.Background>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition />
                    <ColumnDefinition Width="24" />
                </Grid.ColumnDefinitions>
                <StackPanel Orientation="Horizontal">
                    <TextBlock FontWeight="Bold"  
                           VerticalAlignment="Center"  
                           Text="Update Notification:"  
                           Margin="5" />
                    <TextBlock VerticalAlignment="Center">The next time you use   
                    this application, you'll be on a newer version.
                    </TextBlock>
                </StackPanel>
                <TextBlock Grid.Column="1"  
                       HorizontalAlignment="Center"  
                       VerticalAlignment="Center"  
                       FontWeight="Bold"  
                       Text="X"  
                       Padding="6"  
                       MouseLeftButtonDown="OnCloseUpdateNotification"  
                       />
            </Grid>
        </Border>

        <!-- 'ToolBar' -->
        <Border Grid.Row="1" BorderThickness="1" BorderBrush="Gray">
            <StackPanel Orientation="Horizontal">
                <Button Name="OpenButton" Click="OpenButton_Click" Margin="3" ToolTipService.ToolTip="Open">
                    <Image Source="Resources/OpenHS.png" />
                </Button>
                <Button Name="PrintButton" Click="PrintButton_Click" Margin="3" ToolTipService.ToolTip="Print">
                    <Image Source="Resources/PrintHS.png" />
                </Button>
                <Button Name="InstallButton" Click="InstallButton_Click" Margin="3">
                    <StackPanel Orientation="Horizontal">
                        <Image Source="Resources/Setup16.png" />
                        <TextBlock Name="InstallTextBlock" Margin="3 0 0 0">Install application</TextBlock>
                    </StackPanel>
                </Button>
                <TextBlock Name="FileTextBlock" Margin="3" VerticalAlignment="Center" />
            </StackPanel>
        </Border>

        <zipspace:ZipTreeMap x:Name="treeMap" Grid.Row="2" ItemSelected="ZipTreeMap_ItemSelected" />

        <controls:GridSplitter Grid.Row="3" VerticalAlignment="Center" HorizontalAlignment="Stretch" />

        <zipspace:ZipDataGrid Grid.Row="4" x:Name="dataGrid" SelectionChanged="DataGrid_SelectionChanged" />

        <!-- open instructions -->
        <Border Name="openInstructions" Grid.Row="2" Grid.RowSpan="3" BorderThickness="1" BorderBrush="Gray" Background="White">
            <StackPanel Orientation="Horizontal" HorizontalAlignment="Center">
                <TextBlock VerticalAlignment="Center">Drop a file here, or click</TextBlock>
                <Button Click="OpenButton_Click" Margin="3" ToolTipService.ToolTip="Open" VerticalContentAlignment="Center" VerticalAlignment="Center">
                    <Image Source="Resources/OpenHS.png" Stretch="None" />
                </Button>
                <TextBlock VerticalAlignment="Center"> to open a file.</TextBlock>
            </StackPanel>
        </Border>

        <!-- 'StatusBar' -->
        <Border Grid.Row="5" BorderThickness="1" BorderBrush="Gray">
            <Grid>
                <TextBlock Name="statusText" />
            </Grid>
        </Border>
    </Grid>
</UserControl>
